﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MeasureForm.ascx.cs"
    Inherits="SalesManagement.Controls.List.MeasureForm" %>
<%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
<ext:Store ID="storeUnit" runat="server" RemoteSort="true">
    <Reader>
        <ext:JsonReader IDProperty="UnitId">
            <Fields>
                <ext:RecordField Name="UnitId" />
                <ext:RecordField Name="UnitName" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Store ID="storeMeasure" runat="server" RemoteSort="true">
    <Reader>
        <ext:JsonReader>
            <Fields>
                <ext:RecordField Name="ProductId" />
                <ext:RecordField Name="ProductName" />
            </Fields>
        </ext:JsonReader>
    </Reader>
</ext:Store>
<ext:Window ID="winDetails" runat="server" Title="Qui đổi đơn vị" Hidden="true" Width="300"
    Height="160" Resizable="false" Layout="Fit" Modal="true" Icon="ArrowRefresh">
    <Items>
        <ext:FormPanel ID="FormPanel1" runat="server" Frame="true" Header="false" LabelWidth="80"
            Border="false" BodyStyle="background-color:transparent;" Layout="row">
            <Items>
                <ext:Hidden ID="txtProductID" runat="server" />
                <ext:Hidden ID="txtBaseUnit" runat="server" />
                <ext:Hidden ID="txtRatioUnit" runat="server" />
                <ext:ComboBox ID="cboBasicUnit" runat="server" FieldLabel="Đơn vị gốc" Editable="false"
                    StoreID="storeUnit" DisplayField="UnitName" ValueField="UnitId" />
                <ext:ComboBox ID="cboRatioUnit" runat="server" FieldLabel="Đơn vị qui đổi" Editable="false"
                    StoreID="storeUnit" DisplayField="UnitName" ValueField="UnitId" />
                <ext:NumberField runat="server" ID="txtRatio" FieldLabel="Tỷ lệ">
                </ext:NumberField>
            </Items>
        </ext:FormPanel>
    </Items>
    <Buttons>
        <ext:Button ID="btnSave" runat="server" Text="Lưu" Icon="Disk">
            <DirectEvents>
                <Click OnEvent="btnSave_Click">
                    <EventMask ShowMask="true" Msg="Đang lưu..." MinDelay="1000" />
                </Click>
            </DirectEvents>
        </ext:Button>
        <ext:Button ID="btnCancel" runat="server" Text="Hủy bỏ" Icon="Cancel">
            <Listeners>
                <Click Handler="#{winDetails}.hide();" />
            </Listeners>
        </ext:Button>
    </Buttons>
</ext:Window>
